var index={
    laypage:null,
    layer:null,
    page:function (url) {
        console.log(11);
        var total = $("#total").val();
        var curr = $("#curr").val();
        var keyWords = $("#keywords").val();
        layui.use(['laypage','layer'],function () {
            index.laypage = layui.laypage;
            index.layer = layui.layer;
            this.laypage.render({
                elem:'page',
                count:total,
                curr:curr,
                limit:10,
                jump:function (obj,first) {
                    if(!first){
                        if (keyWords == "" || keyWords==undefined){
                            window.location.href=url+"?pageNum="+obj.curr+"&pageSize="+obj.limit;
                        } else{
                            window.location.href=url+"?pageNum="+obj.curr+"&pageSize="+obj.limit+"keyWords="+keyWords;
                        }
                    }
                }
            });
        });
    },
    serach:function (url) {
        var keyWords= $("#keyWords").val();
        location.href=url+"?keyWords="+keyWords;
    }
}